#### license: creative commons cc0 1.0 (public domain) 
#### http://creativecommons.org/publicdomain/zero/1.0/ 
function vget g k
python
    return g[k]
    fig
    fig

function vset g k v
python
    g[k] = v
    return g
    fig
    fig

function d buf params
    gt vget params "token"
    pad arr mid 1 0
    blen buf len
    bs gt ltrim rtrim split bs " " left 1 mid 1 1 val
    bf gt ltrim rtrim split bf " " right 1 mid 1 1 val
    for bwhere 1 blen 1
        ifless bwhere bs
            now arrget buf bwhere
            pad plus now
        else
            ifmore bwhere bf
                now arrget buf bwhere
                pad plus now
                fig
            fig
        next
    now vset params "text" pad
    params now return params
    fig

